package com.szw.dlyk.mapper;

import com.szw.dlyk.commons.DataScope;
import com.szw.dlyk.domain.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.szw.dlyk.query.BaseQuery;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
* @author asus
* @description 针对表【t_user(用户表)】的数据库操作Mapper
* @createDate 2024-01-21 18:16:51
* @Entity com.szw.dlyk.domain.User
*/
@Mapper
public interface UserMapper extends BaseMapper<User> {

    User selectByLoginAct(String username);

    @DataScope(tableAlias = "tu",tableField = "id")
    List<User> selectUserByPage(BaseQuery baseQuery);

    User selectUserById(Integer id);

    int saveUser(User user);

    int updateUser(User user);

    int deleteUserById(Integer id);

    int deleteUserByIds(List<String> idList);

    List<User> selectByOwner();
}




